module CheckInputData
	implicit none
	
	contains
	logical function checkAxEqb(matrix,sol,rhs) 
	
		real(kind=8),dimension(:,:),pointer,intent(in):: matrix
		real(kind=8),dimension(:),pointer,intent(in) :: sol
		real(kind=8),dimension(:),pointer,intent(in) :: rhs
		real(kind=8),allocatable  :: tmpArrayPt(:)
		real(kind=8) :: errorSquare
		
		allocate(tmpArrayPt(size(sol)))
		tmpArrayPt = matmul(matrix,sol) - rhs
		
		errorSquare = DOT_PRODUCT(tmpArrayPt, tmpArrayPt)
		
		checkAxEqb = (errorSquare < 1.0e-12)
		return
	end function checkAxEqb
	
end module